<!--
  Generated template for the IndexPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>index</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <ion-slides style="height:147px" *ngIf="carouselItems.length>0" autoplay=2000 control=true pager=true loop='true'>
    <ion-slide *ngFor="let tmp of carouselItems">
      <img [src]="'http://localhost:8090/framework/forStu/ajia_code/'+tmp.img">
    </ion-slide>
  </ion-slides>
  <h5 style="padding-left:20px;font-size:15px;font-weight:bold">新品上市</h5>
  <ion-scroll style="height:250px;white-space:nowrap" scrollX="true">
    <ion-card *ngFor="let tmp of newArrivalItems" style="display:inline-block">
      <ion-card-header>
        <img style="height:150px" [src]="'http://localhost:8090/framework/forStu/ajia_code/'+tmp.pic">
      </ion-card-header>
      <ion-card-content>{{tmp.title}}</ion-card-content>
    </ion-card>
  </ion-scroll>
  <h5 style="padding-left:20px;font-size:15px;font-weight:bold">推荐商品</h5>
  <!--商品推荐-->
  <ion-list>
    <ion-item [navPush]="detail" [navParams]="{id:tmp.pid}" *ngFor="let tmp of recommendedItems" text-wrap>
      <ion-thumbnail item-start>
        <img [src]="'http://localhost:8090/framework/forStu/ajia_code/'+tmp.pic">
      </ion-thumbnail>
      <h3>{{tmp.title}}123</h3>
      <p>{{tmp.details}}456</p>
      <button ion-button item-end clear>
        <ion-icon name="cart"></ion-icon>
      </button>
    </ion-item>
  </ion-list>
</ion-content>
